<template>
    <div class="layui-layout layui-layout-admin">
        <slidebar></slidebar>
        <div class="layui-body">
            <div class="second-nav">
                <a href="">审核投诉</a> - 
                <a href="javascript:;">内容审核</a>
            </div>
            <div class="layui-content">
                <form class="layui-form" action="">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">微信昵称：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="title" required  lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                    <!-- <div class="layui-form-item"> -->
                        <div class="layui-inline">
                            <label class="layui-form-label">活动名称：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="title" required  lay-verify="required" placeholder="请输入活动名称" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">参与时间：</label>
                            <div class="layui-input-inline">
                            <input type="date" name="price_min" placeholder="" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid">-</div>
                            <div class="layui-input-inline">
                            <input type="date" name="price_max" placeholder="" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">审核状态：</label>
                            <div class="layui-input-inline">
                                <select name="checkStatus" lay-verify="required">
                                    <option value="">请选择</option>
                                    <option value="0">通过</option>
                                    <option value="1">待审核</option>
                                    <option value="2">推荐</option>
                                    <option value="3">拉黑</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <button class="layui-btn btn-query" lay-submit lay-filter="formDemo" @click="preservation()">查询</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </form>
            </div>
            <div style="padding: 10px;">
			    <table class="layui-table" border='0'>
				  	<thead>
					    <tr>
					      <th>序号</th>
					      <th>微信昵称</th>
					      <th>发布时间</th>
					      <th>活动名称</th>
					      <th>发布内容</th>
					      <th>点赞数</th>
					      <th>状态</th>
					      <th>操作</th>
					    </tr>
					</thead>
					<tbody>
				    	<tr>
				          <td>0</td>
					      <td>流量</td>
					      <td>2018-11-11</td>
					      <td>晒晒是啊</td>
					      <td>内容</td>
					      <td>88</td>
					      <td>通过</td>
					      <td class="caozuo">
					      	<a class="edit" href="javascript:;">待审核-</a>
					      	<a class="edit" href="javascript:;">拉黑</a>
					      </td>
				    	</tr>
				   </tbody>
				</table>
				<div id="demo1"></div>
			</div>
        </div>
    </div>
</template>
<script>
import slidebar from '../components/slidebar'
export default {
  name: '',
  data () {
    return {
      images:[],
      sponsor:[]
    }
  },
  components:{
      slidebar:slidebar
  },
  mounted(){
      var that = this
    layui.use('form', function(){
        var form = layui.form;
        //从文档上复制的好像没有这句
        form.render();
            
        //监听提交
        form.on('submit(formDemo)', function(data){
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });
    layui.laypage.render({
        elem: 'demo1'
        ,count: 70//res.data.data.total 数据总数
        ,jump: function(obj){
            console.log(obj)
            that.$axios.get('/apis/admin/activity/list',{params:{page:obj.curr}}).then((res)=>{
                console.log(res)
                for(var i=0;i<res.data.data.length;i++){
                    that.activityList.push(res.data.data[i])
                }
            })
        }
    });
    
  },
  created(){
  },
  methods:{
      deleteImg(index){
        this.images.splice(index,1)
      },
      upFile(){
          var that = this
          var reads= new FileReader();
        var f=document.getElementById('upfile').files[0];
        reads.readAsDataURL(f);
        reads.onload=function (e) {
            that.images.push(this.result)
        };
      },
      preservation(){
        this.$axios.get('/apis/web/v1/admin/prizes').then(res => {
            console.log(res)
        })
      }
  }
}

</script>
<style scoped>
    .layui-body{
        padding: 0 10px
    }
    .second-nav{
        padding: 10px 0;
        border-bottom: 1px solid #666666
    }
    .layui-content{
        padding-top: 40px
    }
    .layui-input-inline{
        width: 150px;
    }
    .btn-query{
        margin-left: 18px
    }
    .caozuo a{
		color: #01AAED;
		cursor: pointer;
	}
	.caozuo a:hover{
		color: #666666;
		cursor: pointer;
	}
</style>